home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / dynSetClipEffectsOptionContr < prev    next >
Encoding:
Text File  |  2003-07-17  |  23.8 KB  |  934 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  July, 1998
  22. //  Author:         Carol Levy
  23. //
  24. //  Description:
  25. //      This script contains code to set the values for the layout
  26. //        controls for the given clip effect selected from the Dynamics
  27. //        Clip Effects menu.  The values are obtained from the option vars.
  28. //
  29. //
  30. //  ================ dynSetClipEffectsOptionControls ================
  31. //
  32. //  SYNOPSIS
  33. //      Set the specified sprite clip effect option box controls.
  34. //
  35. //  INPUT ARGUMENTS
  36. //        string $theClipEffect    the name of the clip effect to set controls for
  37. //        string $parent            the parent layout
  38. //        int $setFactorySettings whether to use default settings.
  39. //
  40. //
  41. global proc dynSetClipEffectsOptionControls(string $theClipEffect, 
  42.                                     string $parent, int $setFactorySettings)
  43. {
  44.     if (!isValidClipEffect($theClipEffect))
  45.         return;
  46.  
  47.     string $procName = ("set"+$theClipEffect+"Controls");
  48.     eval ($procName+" "+$parent+" "+$setFactorySettings);
  49. }
  50.  
  51. //  ================ dynSetSmokeControls ================
  52. //
  53. //  SYNOPSIS
  54. //      Set the moke sprite clip effect option box controls.
  55. //
  56. //  INPUT ARGUMENTS
  57. //        string $theClipEffect    the name of the clip effect to set controls for
  58. //        string $parent            the parent layout
  59. //
  60. global proc setSmokeControls (string $parent, int $setFactorySettings)
  61. {
  62.  
  63.     // Retrieve the option settings
  64.     //
  65.     dynSetClipEffectsOptionVars( "Smoke", $setFactorySettings );
  66.     
  67.     setParent $parent;
  68.     
  69.     // Query the optionVar and set the values into the controls
  70.     //    
  71.  
  72.     // The image controls.
  73.     //
  74.     textFieldGrp -e 
  75.         -text `optionVar -query smokeImageName` 
  76.         smokeImageName;
  77.     checkBoxGrp -e
  78.         -v1 `optionVar -query smokeCycleImages`
  79.         smokeCycleImages;
  80.     intFieldGrp -e
  81.         -v1 `optionVar -query smokeStartImage`
  82.         smokeStartImage;
  83.     intFieldGrp -e
  84.         -v1 `optionVar -query smokeEndImage`
  85.         smokeEndImage;
  86.  
  87.     // The smoke particle controls.
  88.     //
  89.     textFieldGrp -e 
  90.         -text `optionVar -query smokeParticleName` 
  91.         smokeParticleName;
  92.  
  93.     floatSliderGrp -e 
  94.         -v `optionVar -query smokeMinLifespan` 
  95.         smokeMinLifespan;
  96.     floatSliderGrp -e 
  97.         -v `optionVar -query smokeMaxLifespan` 
  98.         smokeMaxLifespan;
  99.     floatSliderGrp -e 
  100.         -v `optionVar -query smokeThreshold` 
  101.         smokeThreshold;
  102.     floatSliderGrp -e 
  103.         -v `optionVar -query smokeOpacity` 
  104.         smokeOpacity;
  105.  
  106.     // The smoke emission controls.
  107.     //
  108.     textFieldGrp -e 
  109.         -text `optionVar -query smokeEmitterName` 
  110.         smokeEmitterName;
  111.  
  112.     floatSliderGrp -e 
  113.         -v `optionVar -query smokeEmissionRate` 
  114.         smokeEmissionRate;
  115.     floatSliderGrp -e 
  116.         -v `optionVar -query smokeEmissionSpread` 
  117.         smokeEmissionSpread;
  118.     floatSliderGrp -e 
  119.         -v `optionVar -query smokeEmissionSpeed` 
  120.         smokeEmissionSpeed;
  121.  
  122.     floatSliderGrp -e 
  123.         -v `optionVar -query smokeEmissionDirX` 
  124.         smokeEmissionDirX;
  125.     floatSliderGrp -e 
  126.         -v `optionVar -query smokeEmissionDirY` 
  127.         smokeEmissionDirY;
  128.     floatSliderGrp -e 
  129.         -v `optionVar -query smokeEmissionDirZ` 
  130.         smokeEmissionDirZ;
  131.  
  132.     // The smoke turbulence controls.
  133.     //
  134.     checkBoxGrp -e
  135.         -v1 `optionVar -query smokeUseTurbulence`
  136.         smokeMotionForces;
  137.  
  138.     textFieldGrp -e 
  139.         -text `optionVar -query smokeTurbulenceName` 
  140.         smokeTurbulenceName;
  141.  
  142.     floatSliderGrp -e 
  143.         -v `optionVar -query smokeTurbulenceMagnitude` 
  144.         smokeTurbulenceMagnitude;
  145.     floatSliderGrp -e 
  146.         -v `optionVar -query smokeTurbulenceFrequency` 
  147.         smokeTurbulenceFrequency;
  148.     floatSliderGrp -e 
  149.         -v `optionVar -query smokeTurbulenceAttenuation` 
  150.         smokeTurbulenceAttenuation;
  151.  
  152. }
  153.  
  154.  
  155. //  ================ dynSetFireControls ================
  156. //
  157. //  SYNOPSIS
  158. //      Set the fire clip effect option box controls.
  159. //
  160. //  INPUT ARGUMENTS
  161. //        string $theClipEffect    the name of the clip effect to set controls for
  162. //        string $parent            the parent layout
  163. //
  164. global proc setFireControls (string $parent, int $setFactorySettings)
  165. {
  166.  
  167.     // Retrieve the option settings
  168.     //
  169.     dynSetClipEffectsOptionVars( "Fire", $setFactorySettings );
  170.     
  171.     setParent $parent;
  172.     
  173.     // Query the optionVars and set ther values into the controls
  174.     //    
  175.  
  176.     // The fire particle controls.
  177.     //
  178.     textFieldGrp -e 
  179.         -text `optionVar -query fireObject` 
  180.         fireObject;
  181.  
  182.     textFieldGrp -e 
  183.         -text `optionVar -query fireParticleName` 
  184.         fireParticleName;
  185.  
  186.     // The fire emission type control.
  187.     //
  188.     int $type = `optionVar -query fireEmissionTypeOV`;
  189.  
  190.     optionMenuGrp -e
  191.         -sl `optionVar -query fireEmissionTypeOV`
  192.         fireEmissionTypeOM;
  193.  
  194.     // The fire emission controls.
  195.     //
  196.     floatSliderGrp -e 
  197.         -v `optionVar -query fireDensity` 
  198.         fireDensity;
  199.     floatSliderGrp -e 
  200.         -v `optionVar -query fireStartRadius` 
  201.         fireStartRadius;
  202.     floatSliderGrp -e 
  203.         -v `optionVar -query fireEndRadius` 
  204.         fireEndRadius;
  205.     floatSliderGrp -e 
  206.         -v `optionVar -query fireIntensity` 
  207.         fireIntensity;
  208.     floatSliderGrp -e 
  209.         -v `optionVar -query fireSpread` 
  210.         fireSpread;
  211.     floatSliderGrp -e 
  212.         -v `optionVar -query fireScale` 
  213.         fireScale;
  214.  
  215.     // The fire turbulence controls.
  216.     //
  217.     floatSliderGrp -e 
  218.         -v `optionVar -query fireTurbulence` 
  219.         fireTurbulence;
  220.  
  221.     // The fire gravity controls.
  222.     //
  223.     floatSliderGrp -e 
  224.         -v `optionVar -query fireSpeed` 
  225.         fireSpeed;
  226.  
  227.     floatSliderGrp -e 
  228.         -v `optionVar -query fireDirectionX` 
  229.         fireDirectionX;
  230.     floatSliderGrp -e 
  231.         -v `optionVar -query fireDirectionY` 
  232.         fireDirectionY;
  233.     floatSliderGrp -e 
  234.         -v `optionVar -query fireDirectionZ` 
  235.         fireDirectionZ;
  236.  
  237.     // Enable/disable the spread control depending on the emitter type.
  238.     //
  239.     dynClipEffectsEmitterOptionChoice($parent);
  240. }
  241.  
  242.  
  243. //  ================ dynSetFlowControls ================
  244. //
  245. //  SYNOPSIS
  246. //      Set the flow-along-curves clip effect option box controls.
  247. //
  248. //  INPUT ARGUMENTS
  249. //        string $theClipEffect    the name of the clip effect to set controls for
  250. //        string $parent            the parent layout
  251. //
  252. global proc setFlowControls (string $parent, int $setFactorySettings)
  253. {
  254.     // Retrieve the option settings
  255.     //
  256.     dynSetClipEffectsOptionVars( "Flow", $setFactorySettings );
  257.     
  258.     setParent $parent;
  259.     
  260.     // Query the optionVars and set their values into the controls
  261.     //    
  262.  
  263.     // The flow object controls.
  264.     //
  265.     textFieldGrp -e 
  266.         -text `optionVar -query flowObject` 
  267.         flowObject;
  268.  
  269.     // The flow creation controls.
  270.     //
  271.     checkBoxGrp -e
  272.         -v1 `optionVar -query flowAttachEmitter`
  273.         flowAttachEmitter;
  274.  
  275.     intSliderGrp -e 
  276.         -v `optionVar -query flowNumControlSegs` 
  277.         flowNumControlSegs;
  278.     intSliderGrp -e 
  279.         -v `optionVar -query flowNumControlSubsegs` 
  280.         flowNumControlSubsegs;
  281.  
  282.     // The flow attribute controls.
  283.     //
  284.     floatSliderGrp -e 
  285.         -v `optionVar -query flowEmitterRate` 
  286.         flowEmitterRate;
  287.     floatSliderGrp -e 
  288.         -v `optionVar -query flowRandomMotion` 
  289.         flowRandomMotion;
  290.     floatSliderGrp -e 
  291.         -v `optionVar -query flowLifespan` 
  292.         flowLifespan;
  293.     floatSliderGrp -e 
  294.         -v `optionVar -query flowGoalWeight` 
  295.         flowGoalWeight;
  296. }
  297.  
  298.  
  299. //  ================ setSurfaceFlowControls ================
  300. //
  301. //  SYNOPSIS
  302. //      Set the flow-along-surface clip effect option box controls.
  303. //
  304. //  INPUT ARGUMENTS
  305. //        string $theClipEffect    the name of the clip effect to set controls for
  306. //        string $parent            the parent layout
  307. //
  308. global proc setSurfaceFlowControls (string $parent, int $setFactorySettings)
  309. {
  310.     // Retrieve the option settings
  311.     //
  312.     dynSetClipEffectsOptionVars( "SurfaceFlow", $setFactorySettings );
  313.     
  314.     setParent $parent;
  315.     
  316.     // Query the optionVars and set their values into the controls
  317.     //    
  318.  
  319.     // The flow object controls.
  320.     //
  321.     textFieldGrp -e
  322.         -text `optionVar -query surfaceFlowObject`
  323.         surfaceFlowObject;
  324.  
  325.     // The flow creation controls.
  326.     //
  327.     checkBoxGrp -e
  328.         -v1 `optionVar -query surfaceFlowCreateParticle`
  329.         surfaceFlowCreateParticle;
  330.     checkBoxGrp -e
  331.         -v1 `optionVar -query surfaceFlowCreateParticleForEachFlow`
  332.         surfaceFlowCreateParticleForEachFlow;
  333.     optionMenuGrp -e
  334.         -value `optionVar -query surfaceFlowManipType`
  335.         surfaceFlowManipType;
  336.     intSliderGrp -e 
  337.         -v `optionVar -query surfaceFlowControlResolution` 
  338.         surfaceFlowControlResolution;
  339.     intSliderGrp -e 
  340.         -v `optionVar -query surfaceFlowSubControlResolution` 
  341.         surfaceFlowSubControlResolution;
  342.     intSliderGrp -e 
  343.         -v `optionVar -query surfaceFlowManipulatorResolution` 
  344.         surfaceFlowManipulatorResolution;
  345.  
  346.     // The flow attribute controls.
  347.     //
  348.     floatSliderGrp -e 
  349.         -v `optionVar -query surfaceFlowGoalWeight` 
  350.         surfaceFlowGoalWeight;
  351.     floatSliderGrp -e 
  352.         -v `optionVar -query surfaceFlowEmitterRate` 
  353.         surfaceFlowEmitterRate;
  354.     floatSliderGrp -e 
  355.         -v `optionVar -query surfaceFlowParticleLifespan` 
  356.         surfaceFlowParticleLifespan;
  357.     floatSliderGrp -e 
  358.         -v `optionVar -query surfaceFlowMinAgeRatio` 
  359.         surfaceFlowMinAgeRatio;
  360.     floatSliderGrp -e 
  361.         -v `optionVar -query surfaceFlowMaxAgeRatio` 
  362.         surfaceFlowMaxAgeRatio;
  363. }
  364.  
  365.  
  366. //  ================ setDeleteSurfaceFlowControls ================
  367. //
  368. //  SYNOPSIS
  369. //      Set the delete-surface-flow clip effect option box controls.
  370. //
  371. //  INPUT ARGUMENTS
  372. //        string $theClipEffect    the name of the clip effect to set controls for
  373. //        string $parent            the parent layout
  374. //
  375. global proc setDeleteSurfaceFlowControls(string $parent,int $setFactorySettings)
  376. {
  377.     // Retrieve the option settings
  378.     //
  379.     dynSetClipEffectsOptionVars( "DeleteSurfaceFlow", $setFactorySettings );
  380.     
  381.     setParent $parent;
  382.     
  383.     radioButtonGrp -e
  384.         -sl `optionVar -query deleteSurfaceFlow`
  385.         deleteSurfaceFlow;
  386.     radioButtonGrp -e
  387.         -sl `optionVar -query removeParticlesFromSurfaceFlow`
  388.         removeParticlesFromSurfaceFlow;
  389.     checkBoxGrp -e
  390.         -v1 `optionVar -query deleteSurfaceFlowParticles`
  391.         deleteSurfaceFlowParticles;
  392. }
  393.  
  394.  
  395. //  ================ setLightningControls ================
  396. //
  397. //  SYNOPSIS
  398. //      Set the lightning clip effect option box controls.
  399. //
  400. //  INPUT ARGUMENTS
  401. //        string $theClipEffect    the name of the clip effect to set controls for
  402. //        string $parent            the parent layout
  403. //
  404. global proc setLightningControls (string $parent, int $setFactorySettings)
  405. {
  406.     // Retrieve the option settings
  407.     //
  408.     dynSetClipEffectsOptionVars( "Lightning", $setFactorySettings );
  409.     
  410.     setParent $parent;
  411.     
  412.     // The lightning object controls.
  413.     //
  414.     textFieldGrp -e
  415.         -text `optionVar -query lightningObject`
  416.         lightningObject;
  417.  
  418.     // The lightning creation controls.
  419.     //
  420.     checkBoxGrp -e
  421.         -v1 `optionVar -query lightningGrouping`
  422.         lightningGrouping;
  423.     radioButtonGrp -e
  424.         -sl `optionVar -query lightningCreateOptions`
  425.         lightningCreateOptions;
  426.     intSliderGrp -e 
  427.         -v `optionVar -query lightningCurveSegments` 
  428.         lightningCurveSegments;
  429.  
  430.     // The lightning attribute controls.
  431.     //
  432.     floatSliderGrp -e
  433.         -v `optionVar -query lightningThickness` 
  434.         lightningThickness;
  435.  
  436.     floatSliderGrp -e
  437.         -v `optionVar -query lightningMaxSpread` 
  438.         lightningMaxSpread;
  439.  
  440.     floatSliderGrp -e
  441.         -v `optionVar -query lightningStart` 
  442.         lightningStart;
  443.  
  444.     floatSliderGrp -e
  445.         -v `optionVar -query lightningEnd` 
  446.         lightningEnd;
  447.  
  448.     floatSliderGrp -e
  449.         -v `optionVar -query lightningGlowIntensity` 
  450.         lightningGlowIntensity;
  451. }
  452.  
  453.  
  454. //  ================ dynSetMeltControls ================
  455. //
  456. //  SYNOPSIS
  457. //      Set the melt clip effect option box controls.
  458. //
  459. //  INPUT ARGUMENTS
  460. //        string $theClipEffect    the name of the clip effect to set controls for
  461. //        string $parent            the parent layout
  462. //
  463. global proc setMeltControls (string $parent, int $setFactorySettings)
  464. {
  465.  
  466.     // Retrieve the option settings
  467.     //
  468.     dynSetClipEffectsOptionVars( "Melt", $setFactorySettings );
  469.     
  470.     setParent $parent;
  471.     
  472.     // Query the optionVars and set their values into the controls
  473.     //    
  474.  
  475.     // The melt controls.
  476.     //
  477.     textFieldGrp -e 
  478.         -text `optionVar -query meltObject` 
  479.         meltObject;
  480.  
  481.     textFieldGrp -e 
  482.         -text `optionVar -query meltOnObject` 
  483.         meltOnObject;
  484.  
  485.  
  486.     // The melt controls.
  487.     //
  488.     floatSliderGrp -e 
  489.         -v `optionVar -query meltSpeed` 
  490.         meltSpeed;
  491.     floatSliderGrp -e 
  492.         -v `optionVar -query meltSpread` 
  493.         meltSpread;
  494.     floatSliderGrp -e 
  495.         -v `optionVar -query meltDistortion` 
  496.         meltDistortion;
  497.  
  498.     floatSliderGrp -e 
  499.         -v `optionVar -query meltDirectionX` 
  500.         meltDirectionX;
  501.     floatSliderGrp -e 
  502.         -v `optionVar -query meltDirectionY` 
  503.         meltDirectionY;
  504.     floatSliderGrp -e 
  505.         -v `optionVar -query meltDirectionZ` 
  506.         meltDirectionZ;
  507.  
  508.     checkBoxGrp -e
  509.         -v1 `optionVar -query meltUseLatticeRes`
  510.         meltUseLatticeRes;
  511.  
  512.     floatSliderGrp -e 
  513.         -v `optionVar -query meltLatticeResX` 
  514.         meltLatticeResX;
  515.     floatSliderGrp -e 
  516.         -v `optionVar -query meltLatticeResY` 
  517.         meltLatticeResY;
  518.     floatSliderGrp -e 
  519.         -v `optionVar -query meltLatticeResZ` 
  520.         meltLatticeResZ;
  521.  
  522.     // Enable/disable the control resolution controls depending on the 
  523.     // value of the use checkbox
  524.     //
  525.     int $isOn = `checkBoxGrp -q -v1 meltUseLatticeRes`;
  526.     dynEnableLatticeResCB($parent, $isOn);
  527. }
  528.  
  529.  
  530. //  ================ dynSetFireworksControls ================
  531. //
  532. //  SYNOPSIS
  533. //      Set the fireworks clip effect option box controls.
  534. //
  535. //  INPUT ARGUMENTS
  536. //        string $theClipEffect    the name of the clip effect to set controls for
  537. //        string $parent            the parent layout
  538. //
  539. global proc setFireworksControls (string $parent, int $setFactorySettings)
  540. {
  541.  
  542.     // Retrieve the option settings
  543.     //
  544.     dynSetClipEffectsOptionVars( "Fireworks", $setFactorySettings );
  545.     
  546.     setParent $parent;
  547.     
  548.     // Query the optionVars and set their values into the controls
  549.     //    
  550.  
  551.     // The fireworks controls.
  552.     //
  553.     textFieldGrp -e -text `optionVar -query fireworksName` fireworksName;
  554.  
  555.     intSliderGrp -e 
  556.         -v `optionVar -query fwNumRockets`
  557.         fwNumRockets;
  558.  
  559.     floatSliderGrp -e 
  560.         -v `optionVar -query fwLaunchPositionX`
  561.         fwLaunchPositionX;
  562.     floatSliderGrp -e 
  563.         -v `optionVar -query fwLaunchPositionY`
  564.         fwLaunchPositionY;
  565.     floatSliderGrp -e 
  566.         -v `optionVar -query fwLaunchPositionZ`
  567.         fwLaunchPositionZ;
  568.     floatSliderGrp -e 
  569.         -v `optionVar -query fwBurstPosCenterX`
  570.         fwBurstPosCenterX;
  571.     floatSliderGrp -e 
  572.         -v `optionVar -query fwBurstPosCenterY`
  573.         fwBurstPosCenterY;
  574.     floatSliderGrp -e 
  575.         -v `optionVar -query fwBurstPosCenterZ`
  576.         fwBurstPosCenterZ;
  577.     floatSliderGrp -e 
  578.         -v `optionVar -query fwBurstExtentsX`
  579.         fwBurstExtentsX;
  580.     floatSliderGrp -e 
  581.         -v `optionVar -query fwBurstExtentsY`
  582.         fwBurstExtentsY;
  583.     floatSliderGrp -e 
  584.         -v `optionVar -query fwBurstExtentsZ`
  585.         fwBurstExtentsZ;
  586.  
  587.     floatSliderGrp -e 
  588.         -v `optionVar -query fwFirstLaunchFrame`
  589.         fwFirstLaunchFrame;
  590.     floatSliderGrp -e 
  591.         -v `optionVar -query fwLaunchRate`
  592.         fwLaunchRate;
  593.     floatSliderGrp -e 
  594.         -v `optionVar -query fwMinFlightTime`
  595.         fwMinFlightTime;
  596.     floatSliderGrp -e 
  597.         -v `optionVar -query fwMaxFlightTime`
  598.         fwMaxFlightTime;
  599.     floatSliderGrp -e 
  600.         -v `optionVar -query fwMaxBurstSpeed`
  601.         fwMaxBurstSpeed;
  602.     floatSliderGrp -e 
  603.         -v `optionVar -query fwTrailRate`
  604.         fwTrailRate;
  605.     floatSliderGrp -e 
  606.         -v `optionVar -query fwTrailSpeed`
  607.         fwTrailSpeed;
  608.     floatSliderGrp -e 
  609.         -v `optionVar -query fwTrailSpread`
  610.         fwTrailSpread;
  611.     floatSliderGrp -e 
  612.         -v `optionVar -query fwMinTrailTailSize`
  613.         fwMinTrailTailSize;
  614.     floatSliderGrp -e 
  615.         -v `optionVar -query fwMaxTrailTailSize`
  616.         fwMaxTrailTailSize;
  617.  
  618.     checkBoxGrp -e
  619.         -v1 `optionVar -query fwTrailSetUserColor`
  620.         fwTrailSetUserColor;
  621.     textFieldGrp -e 
  622.         -text `optionVar -query fwTrailColorCreationProc` 
  623.         fwTrailColorCreationProc;
  624.     intSliderGrp -e 
  625.         -v `optionVar -query fwTrailNumColors`
  626.         fwTrailNumColors;
  627.     floatSliderGrp -e 
  628.         -v `optionVar -query fwTrailGlowIntensity`
  629.         fwTrailGlowIntensity;
  630.     floatSliderGrp -e 
  631.         -v `optionVar -query fwTrailIncanIntensity`
  632.         fwTrailIncanIntensity;
  633.  
  634.     floatSliderGrp -e 
  635.         -v `optionVar -query fwMinSparksCount`
  636.         fwMinSparksCount;
  637.     floatSliderGrp -e 
  638.         -v `optionVar -query fwMaxSparksCount`
  639.         fwMaxSparksCount;
  640.     floatSliderGrp -e 
  641.         -v `optionVar -query fwMinSparksTailSize`
  642.         fwMinSparksTailSize;
  643.     floatSliderGrp -e 
  644.         -v `optionVar -query fwMaxSparksTailSize`
  645.         fwMaxSparksTailSize;
  646.     checkBoxGrp -e
  647.         -v1 `optionVar -query fwSparksSetUserColor`
  648.         fwSparksSetUserColor;
  649.     textFieldGrp -e 
  650.         -text `optionVar -query fwSparksColorCreationProc` 
  651.         fwSparksColorCreationProc;
  652.     intSliderGrp -e 
  653.         -v `optionVar -query fwSparksNumColors`
  654.         fwSparksNumColors;
  655.     intSliderGrp -e 
  656.         -v `optionVar -query fwSparksColorSpread`
  657.         fwSparksColorSpread;
  658.     floatSliderGrp -e 
  659.         -v `optionVar -query fwSparksGlowIntensity`
  660.         fwSparksGlowIntensity;
  661.     floatSliderGrp -e 
  662.         -v `optionVar -query fwSparksIncanIntensity`
  663.         fwSparksIncanIntensity;
  664.  
  665.     // Enable/disable the random color creation controls depending on
  666.     // the /value of the random checkbox
  667.     //
  668.     int $isOn = `checkBoxGrp -q -v1 fwTrailSetUserColor`;
  669.     fwTrailSetUserColorProcCB($parent, $isOn);
  670.  
  671.     int $isOn = `checkBoxGrp -q -v1 fwSparksSetUserColor`;
  672.     fwSparksSetUserColorProcCB($parent, $isOn);
  673. }
  674.  
  675. //  ================ setShatterControls ================
  676. //
  677. //  SYNOPSIS
  678. //      Set the shatter clip effect option box controls.
  679. //
  680. //  INPUT ARGUMENTS
  681. //        string $theClipEffect    the name of the clip effect to set controls for
  682. //        string $parent            the parent layout
  683. //
  684. global proc setShatterControls (string $parent, int $setFactorySettings)
  685. {
  686.     setParent $parent;
  687.  
  688.     dynSetClipEffectsOptionVars( "Shatter", $setFactorySettings );
  689.     string $shatterTypeValue = `optionVar -query shatterType`;
  690.  
  691.     // Make sure the tab is set properly.
  692.     //
  693.     if ( `tabLayout -exists shatterTabLayout` )
  694.     {
  695.         tabLayout -e -selectTab $shatterTypeValue shatterTabLayout;
  696.     }
  697.  
  698.     if ( $setFactorySettings )
  699.     {
  700.         if ( $shatterTypeValue == "shatterSurfaceTab" )
  701.         {
  702.             setSurfaceShatterControls( $parent );
  703.         }
  704.         else if ( $shatterTypeValue == "shatterSolidTab" )
  705.         {
  706.             setSolidShatterControls( $parent );
  707.         }
  708.         else if ( $shatterTypeValue == "shatterCrackTab" )
  709.         {
  710.             setCrackShatterControls( $parent );
  711.         }
  712.     }
  713.     else
  714.     {
  715.         setSurfaceShatterControls( $parent );
  716.         setSolidShatterControls( $parent );
  717.         setCrackShatterControls( $parent );
  718.     }
  719. }
  720.  
  721.  
  722. //  ================ setSurfaceShatterControls ================
  723. //
  724. //  SYNOPSIS
  725. //      Set the shatter clip effect option box controls.
  726. //
  727. //  INPUT ARGUMENTS
  728. //        string $theClipEffect    the name of the clip effect to set controls for
  729. //        string $parent            the parent layout
  730. //
  731. global proc setSurfaceShatterControls (string $parent )
  732. {
  733.     // Query the optionVar and set the values into the controls
  734.     //    
  735.     textFieldGrp -e 
  736.         -text `optionVar -query shatterSurfaceName` 
  737.         shatterSurfaceName;
  738.  
  739.     intSliderGrp -e 
  740.         -v `optionVar -query shatterSurfaceShardCount` 
  741.         shatterSurfaceShardCount;
  742.  
  743. //    checkBoxGrp -e
  744. //        -v1 `optionVar -query shatterSurfaceExactCount`
  745. //        shatterExactCount;
  746.  
  747.     checkBoxGrp -e
  748.         -v1 `optionVar -query shatterSurfaceSmoothing`
  749.         shatterSurfaceSmoothing;
  750.  
  751.     floatSliderGrp -e 
  752.         -v `optionVar -query shatterSurfaceExtrude`
  753.         shatterSurfaceExtrude;
  754.  
  755.     checkBoxGrp -e
  756.         -v1 `optionVar -query shatterSurfaceTriangulate`
  757.         shatterSurfaceTriangulate;
  758.  
  759. //    floatSliderGrp -e 
  760. //        -v `optionVar -query shatterSurfaceEdgePerturbation` 
  761. //        shatterSurfaceEdgePerturbation;
  762.  
  763.     optionMenuGrp -e 
  764.         -v `optionVar -query shatterSurfacePostOperation` 
  765.         shatterSurfacePostOperation;
  766.  
  767.     checkBoxGrp -e
  768.         -v1 `optionVar -query shatterSurfaceVerbose`
  769.         shatterSurfaceVerbose;
  770.  
  771.     int $originalSurface = `optionVar -query shatterSurfaceOriginal`;
  772.  
  773.     if ( $originalSurface > 3 )
  774.     {
  775.         $originalSurface -= 3;
  776.         radioButtonGrp -e -select $originalSurface shatterSurfaceOriginal1;
  777.     }
  778.     else
  779.     {
  780.         radioButtonGrp -e -select $originalSurface shatterSurfaceOriginal;
  781.     }
  782.  
  783.     checkBoxGrp -e
  784.         -v1 `optionVar -query shatterSurfaceMakeRigidBody`
  785.         shatterSurfaceMakeRigidBody;
  786.  
  787.     intSliderGrp -e 
  788.         -v `optionVar -query shatterSurfaceSeedValue` 
  789.         shatterSurfaceSeedValue;
  790. }
  791.  
  792.  
  793. //  ================ setSolidShatterControls ================
  794. //
  795. //  SYNOPSIS
  796. //      Set the solid shatter clip effect option box controls.
  797. //
  798. //  INPUT ARGUMENTS
  799. //        string $theClipEffect    the name of the clip effect to set controls for
  800. //        string $parent            the parent layout
  801. //
  802. global proc setSolidShatterControls (string $parent )
  803. {
  804.     // Query the optionVar and set the values into the controls
  805.     //    
  806.     textFieldGrp -e 
  807.         -text `optionVar -query shatterSolidName` 
  808.         shatterSolidName;
  809.  
  810.     intSliderGrp -e 
  811.         -v `optionVar -query shatterSolidShardCount` 
  812.         shatterSolidShardCount;
  813.  
  814.     checkBoxGrp -e
  815.         -v1 `optionVar -query shatterSolidTriangulate`
  816.         shatterSolidTriangulate;
  817.  
  818.     checkBoxGrp -e
  819.         -v1 `optionVar -query shatterSolidInteriorMaterial`
  820.         shatterSolidInteriorMaterial;
  821.  
  822.     int $removeInterior = `optionVar -query shatterSolidRemoveInterior`;
  823.  
  824.     checkBoxGrp -e
  825. //        -v1 `optionVar -query shatterSolidRemoveInterior`
  826.         -v1 $removeInterior
  827.         shatterSolidRemoveInterior;
  828.  
  829.     floatSliderGrp -e 
  830.         -v `optionVar -query shatterSolidExtrude`
  831.         -enable $removeInterior
  832.         shatterSolidExtrude;
  833.  
  834.     floatSliderGrp -e 
  835.         -v `optionVar -query shatterSolidEdgePerturbation` 
  836.         shatterSolidEdgePerturbation;
  837.  
  838.     optionMenuGrp -e 
  839.         -v `optionVar -query shatterSolidPostOperation` 
  840.         shatterSolidPostOperation;
  841.  
  842.     checkBoxGrp -e
  843.         -v1 `optionVar -query shatterSolidVerbose`
  844.         shatterSolidVerbose;
  845.  
  846.     int $originalSurface = `optionVar -query shatterSolidOriginal`;
  847.  
  848.     if ( $originalSurface > 3 )
  849.     {
  850.         $originalSurface -= 3;
  851.         radioButtonGrp -e -select $originalSurface shatterSolidOriginal1;
  852.     }
  853.     else
  854.     {
  855.         radioButtonGrp -e -select $originalSurface shatterSolidOriginal;
  856.     }
  857.  
  858.     checkBoxGrp -e
  859.         -v1 `optionVar -query shatterSolidMakeRigidBody`
  860.         shatterSolidMakeRigidBody;
  861.  
  862.     intSliderGrp -e 
  863.         -v `optionVar -query shatterSolidSeedValue` 
  864.         shatterSolidSeedValue;
  865. }
  866.  
  867.  
  868. //  ================ setCrackShatterControls ================
  869. //
  870. //  SYNOPSIS
  871. //      Set the shatter clip effect option box controls.
  872. //
  873. //  INPUT ARGUMENTS
  874. //        string $theClipEffect    the name of the clip effect to set controls for
  875. //        string $parent            the parent layout
  876. //
  877. global proc setCrackShatterControls (string $parent )
  878. {
  879.     // Query the optionVar and set the values into the controls
  880.     //    
  881.     textFieldGrp -e 
  882.         -text `optionVar -query shatterCrackName` 
  883.         shatterCrackName;
  884.  
  885.     intSliderGrp -e 
  886.         -v `optionVar -query shatterCrackCount` 
  887.         shatterCrackCount;
  888.  
  889.     intSliderGrp -e 
  890.         -v `optionVar -query shatterCrackLength` 
  891.         shatterCrackLength;
  892.  
  893.     floatSliderGrp -e 
  894.         -v `optionVar -query shatterCrackExtrude`
  895.         shatterCrackExtrude;
  896.  
  897.     checkBoxGrp -e
  898.         -v1 `optionVar -query shatterCrackTriangulate`
  899.         shatterCrackTriangulate;
  900.  
  901.     floatSliderGrp -e 
  902.         -v `optionVar -query shatterCrackEdgePerturbation` 
  903.         shatterCrackEdgePerturbation;
  904.  
  905.     optionMenuGrp -e 
  906.         -v `optionVar -query shatterCrackPostOperation` 
  907.         shatterCrackPostOperation;
  908.  
  909.     checkBoxGrp -e
  910.         -v1 `optionVar -query shatterCrackVerbose`
  911.         shatterCrackVerbose;
  912.  
  913.     int $originalSurface = `optionVar -query shatterCrackOriginal`;
  914.  
  915.     if ( $originalSurface > 3 )
  916.     {
  917.         $originalSurface -= 3;
  918.         radioButtonGrp -e -select $originalSurface shatterCrackOriginal1;
  919.     }
  920.     else
  921.     {
  922.         radioButtonGrp -e -select $originalSurface shatterCrackOriginal;
  923.     }
  924.  
  925.     checkBoxGrp -e
  926.         -v1 `optionVar -query shatterCrackMakeRigidBody`
  927.         shatterCrackMakeRigidBody;
  928.  
  929.     intSliderGrp -e 
  930.         -v `optionVar -query shatterCrackSeedValue` 
  931.         shatterCrackSeedValue;
  932. }
  933.  
  934.